import request from '@/utils/request'

/**
 * 获取菜单列表
 * @param searchParams 
 * @returns 
 */
export const getMenuList = (searchParams?: any) => request.get({
    url: '/adminapi/system.permission/lists',
    params: searchParams
})

/**
 * 保存菜单
 * @param data 
 * @returns 
 */
export const saveMenu = (data: any) => request.post({
    url: '/adminapi/system.permission/save',
    data
})

/**
 * 更新菜单
 * @param data 
 * @returns 
 */
export const updateMenu = (data: any) => request.put({
    url: '/adminapi/system.permission/update',
    data
})

/**
 * 删除菜单
 * @param id 
 * @returns 
 */
export const deleteMenu = (id: number) => request.delete({
    url: '/adminapi/system.permission/delete',
    params: { id }
})

